<template>
  <div>
   <Row class="">
     <!-- <IFrame> -->
       <Col span="7" class="margin_form">
       <Card title="初始化项目信息">
        <Form>
          <FormItem label="输入测试项目名称">
            <Input placeholder="请输入测试项目名称(英文)" v-model="ProjectTestInfo.ProjectName"></Input>
          </FormItem>
          <FormItem label="输入测试人名称">
            <Input placeholder="请输入测试人名称" v-model="ProjectTestInfo.Tester"></Input>
          </FormItem>
          <div style="float:right">
            <Button @click="cancel">取消</Button>
            <Button @click="nextStep">下一步</Button>
          </div>
          <div style="clear:right"></div>
        </Form>
       </Card>
       </Col>
     <!-- </IFrame> -->
   </Row>
  </div>
</template>
<script lang="ts">
import {
  Vue,
  Component,
  Prop,
  Watch,
  Emit,
  Model,
  Inject,
  Provide
} from "vue-property-decorator";
import { Getter, Action, State, Mutation } from "vuex-class";
import { constants } from "http2";
declare let require: any;
//TODO 导入搜索接口
//props的属性一般不需要再在类中进行初始化
@Component({
  components: {
    AddStepInfo: (r: any) => require(["../component/AddStepInfo.vue"], r)
  }
})
export default class Index extends Vue {
  //项目测试信息
  ProjectTestInfo: any = {
    ProjectName: "",
    Tester: ""
  };
  cancel() {
    window.close();
  }
  nextStep() {
    //将数据添加到localstorage
    let Functions = { Functions: [] };
    localStorage.setItem(
      "ProjectInfo",
      JSON.stringify(Object.assign(this.ProjectTestInfo, Functions))
    );
    this.$router.push("/initFunction");
  }
}
</script>
<style scoped>
.margin_form {
  margin: 50px 50px;
}
</style>
